<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="JavaScript/jquery.min.js"></script>
</head>
<style>
    div {
        width: 100px;
        height: 100px;
        background-color: pink;
    }
</style>

<body>

    <script>
        // $('div').hide();  页面无法被隐藏
        // 1.等到页面被加载后再去执行js代码
        // $(document).ready(function() {
        //     $('div').hide();
        // })
        // 2.等到页面被加载后再去执行js代码
        $(function() {
            $('div').hide();
        })
    </script>
    <div></div>

</body>

</html>